var Utils = function () {

    var context = null;

    var initStatics = function () {
        context = $("meta[name='static:context']").attr("content");
        if (context.lastIndexOf("/") !== context.length - 1) {
            context += "/";
        }
    };

    var initPlugins = function () {
        try {
            toastr.options = {
                "closeButton": true,
                "positionClass": "toast-bottom-right"
            }
        } catch (e) {
        }
    };

    return {
        init: function () {
            initStatics();
            initPlugins();
        },
        url: function (subUrl) {
            return context + (subUrl.indexOf("/") === 0 ? "/" : "") + subUrl;
        }
    }
}();

$(function () {
    Utils.init();
});